﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using TurtleLib.ComputerCraft;

namespace TurtleLib.Simulation
{
  public class AdvancedComputerUx : AdvancedScreen, ISubscriber<ComputerCraft.AdvancedComputer>
  {
    public AdvancedComputerUx(DragablePanel parent)
      : base(parent)
    {
      parent.BackColor = Color.Gold;
    }

    public void SubscribeTo(ComputerCraft.AdvancedComputer host)
    {
      var caccess = new ComputerCraft.Computer.ComputerAccess(host);
      SetTitle(host.GetType().Name);

      SubscribeToStatusUpdates(host);
      base.SubscribeTo(caccess.Term);
    }
  }
}
